const key = 'yuanfeng-token'
const keytime = 'yuanfeng-tokenTime'
const keyRoute = 'yuanfeng-route'

export const setToken = (token) => {
  return localStorage.setItem(key, token)
}

export const getToken = () => {
  return localStorage.getItem(key)
}

export const delToken = () => {
  return localStorage.removeItem(key)
}

export const setTokenTime = (time) => {
  return localStorage.setItem(keytime, time)
}

export const getTokenTime = () => {
  return localStorage.getItem(keytime)
}

export const delTokenTime = () => {
  return localStorage.removeItem(keytime)
}

export const setRoute = (path) => {
  return localStorage.setItem(keyRoute, path)
}

export const getRoute = () => {
  return localStorage.getItem(keyRoute)
}

export const delRoute = () => {
  return localStorage.removeItem(keyRoute)
}
